#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>




int main() {
	//FILE *arr = fopen("text.txt", 'w');
	FILE *arr = fopen("text.txt", "w");
	if (arr == NULL) {
		return 1;
	}
	int a=fputs("abcdef", arr);
	fclose(arr);
	arr = NULL;
	arr = fopen("text.txt", "r");

	char b[10] = {0};
	fgets(b, 6, arr);
	printf("%s", b);
	fclose(arr);
	arr = NULL;

	return 0;
}
